Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: send l1infotree data to the aggchain prover #183

Merged

Conversation

goran-ethernal
Copy link
Contributor

@goran-ethernal goran-ethernal commented Feb 5, 2025

Description

This PR implements the additional logic of sending l1infotree data to the aggchain prover that is needed to generate a aggchain (auth) proof.

The data includes:

  • start block from which to build a proof.
  • max end block to which a proof needs to be built.
  • last finalized l1InfoTreeRoot.
  • the leaf with the highest index on that block and given finalized l1infoTreeRoot.
  • merkle proof of the given leaf on given root.

Based on the provided block range and on the finalized l1 info tree data we send to the prover, prover can either return the maximum block range we asked, or return a smaller range.

But, in order to do this, all the syncers need to store block hash as well to the block table. Before this PR, only l1infotreesyncer stored this data, but we might need it in all syncers (to be consistent), so this PR expanded all the syncers to store the block hash as well.

Fixes # (issue)

@goran-ethernal goran-ethernal marked this pull request as ready for review February 5, 2025 13:29
@goran-ethernal goran-ethernal self-assigned this Feb 5, 2025
bridgesync/migrations/migrations_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@joanestebanr joanestebanr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the reason that you need blockHash to all syncers? It looks like is not used on bridesync neither lastgersync.. isn't?

@goran-ethernal
Copy link
Contributor Author

Why is the reason that you need blockHash to all syncers? It looks like is not used on bridesync neither lastgersync.. isn't?

To be consistent. It is useful for debugging, if we have issues on other syncers with reorg detection.

@goran-ethernal goran-ethernal merged commit 395838f into feat/aggchain-prover Feb 6, 2025
11 checks passed
@goran-ethernal goran-ethernal deleted the feat/aggsender-send-l1inforoot-to-prover branch February 6, 2025 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants